﻿using System;

namespace Budjelar.Repository
{
    public interface IRepository<T> where T : class
    {
        System.Linq.IQueryable<T> AsQueryable();
        System.Collections.Generic.IEnumerable<T> Find(System.Linq.Expressions.Expression<Func<T, bool>> where);

        T First();

        T First(System.Linq.Expressions.Expression<Func<T, bool>> where);

        System.Collections.Generic.IEnumerable<T> GetAll();

        T Single();

        T Single(System.Linq.Expressions.Expression<Func<T, bool>> where);

        void Save(T entity);
    }
}